package com.example.order.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "order_tbl")
public class Order {

    public static final String FILED_ID = "id";
    public static final String FILED_USER_ID = "userId";
    public static final String FILED_COMMODITY_CODE = "commodityCode";
    public static final String FILED_COUNT = "count";
    public static final String FILED_MONEY = "money";

    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "commodity_code")
    private String commodityCode;

    @Column(name = "count")
    private Integer count;

    @Column(name = "money")
    private Integer money;
}
